<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 4/1/12
 * Time: 7:10 PM
 */
class Principal extends CI_Controller
{
    function __construct(){
        parent::__construct();
        $this->load->model("historial", "dao");
    }

    function find(){
        $result=$this->dao->findPrincipal("h.historial_k, h.titulo, h.fecha, h.descripcion, concat('[{\"foto\" : \"',group_concat(hf.foto separator '\"},{\"foto\" : \"'),'\"}]') as fotos",'h.activo = 1',$this->input->post("start"),3);
        $result["success"]=true;
        //print_r($result);
        echo json_encode($result);
    }
}
